Script for automating deployment docs #336
Open
+2,929
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I'd previously done this manually, but there are getting to be too many deployments, and different users care about different things, so this PR adds a general set of functions to generate graphical documentation of Balancer deployments, based on the information in this repo (mostly the README). It can be copied right to the public docs, or used internally, and shows the history of deployments (e.g., all versions of the weighted pool).
The script readme has full documentation. Essentially, there are three steps:
Parse the README to get a json of all deployments, and a list of all the "families" (i.e., products). It assumes a standard naming convention, which we mostly follow, but allows for overriding it if we deviate. (It does this for stable pools.)
Read the deployments JSON from the previous step, and generate a GraphViz .dot file with one or more families (from the index).
Generate an SVG from the .dot file, using GraphViz.
It's in Python instead of TS because I needed the GraphViz libraries, and CI supports GraphViz, if we want to eventually automate it.
See docs-v3 PR #305.
This includes examples of the output for pools (weighted-pool,stable-pool,v3-weighted-pool,v3-stable-pool), for ease of review; we might want to remove that before merging.
CI runs the first step, which always keeps deployments.json current (fails if something made it change). If this is too onerous, we can remove it.
Type of change
Checklist:
master, or there's a description of how to mergeIssue Resolution